import type {VxeGridPropTypes} from "#/adapter/vxe-table";
import {getOptionsFromDict} from "#/utils";
import {AppDomain} from "#/views/toc/data";
import {type FormSchema} from '#/../../../packages/@core/ui-kit/form-ui/src/types'

export const table_columns:VxeGridPropTypes.Columns=[
  {field:'podcastCategoryName',title:'分类',},
  {field:'domain',title:'作用域',slots:{default:"domain"}},
  {title:'操作',slots:{default:'option'}},
]

export const form_schema:FormSchema<any>[]=[
  {
    fieldName:'podcastCategoryName',
    component:'Input',
    label:'分类',
    rules:'required'
  },
  {
    fieldName:'domain',
    component:'Select',
    componentProps:{
      options:getOptionsFromDict(AppDomain),
      multiple:false
    },
    label:'作用域',
    rules:'required'
  },
  {
    fieldName:'sort',
    component:'InputNumber',
    label:'排序',
    rules:'required'
  }
]
